VERSION 5.00
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Begin VB.Form frmOptions 
   BorderStyle     =   1  'Fixed Single
   ClientHeight    =   5070
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5910
   HelpContextID   =   131
   Icon            =   "Options.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5070
   ScaleWidth      =   5910
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton cmdClose 
      Appearance      =   0  'Flat
      Height          =   495
      Left            =   5280
      Picture         =   "Options.frx":0CCA
      Style           =   1  'Graphical
      TabIndex        =   1
      TabStop         =   0   'False
      Top             =   4460
      Width           =   500
   End
   Begin VB.CommandButton cmdCancel 
      Appearance      =   0  'Flat
      Height          =   495
      Left            =   4680
      Picture         =   "Options.frx":1BD0
      Style           =   1  'Graphical
      TabIndex        =   0
      TabStop         =   0   'False
      Top             =   4460
      Width           =   495
   End
   Begin TabDlg.SSTab tabOptions 
      Height          =   4235
      Left            =   120
      TabIndex        =   2
      TabStop         =   0   'False
      Top             =   120
      Width           =   5685
      _ExtentX        =   10028
      _ExtentY        =   7461
      _Version        =   393216
      Tabs            =   2
      TabHeight       =   441
      TabCaption(0)   =   "<General>"
      TabPicture(0)   =   "Options.frx":2AD6
      Tab(0).ControlEnabled=   -1  'True
      Tab(0).Control(0)=   "tabGeneral"
      Tab(0).Control(0).Enabled=   0   'False
      Tab(0).ControlCount=   1
      TabCaption(1)   =   "<Language>"
      TabPicture(1)   =   "Options.frx":2AF2
      Tab(1).ControlEnabled=   0   'False
      Tab(1).Control(0)=   "tabLanguage"
      Tab(1).ControlCount=   1
      Begin TabDlg.SSTab tabGeneral 
         Height          =   3515
         Left            =   120
         TabIndex        =   3
         Top             =   360
         Width           =   5295
         _ExtentX        =   9340
         _ExtentY        =   6191
         _Version        =   393216
         TabOrientation  =   1
         Tabs            =   2
         TabsPerRow      =   2
         TabHeight       =   520
         TabCaption(0)   =   "<Application>"
         TabPicture(0)   =   "Options.frx":2B0E
         Tab(0).ControlEnabled=   -1  'True
         Tab(0).Control(0)=   "lblLanguage"
         Tab(0).Control(0).Enabled=   0   'False
         Tab(0).Control(1)=   "lblDatabase"
         Tab(0).Control(1).Enabled=   0   'False
         Tab(0).Control(2)=   "lblProvider"
         Tab(0).Control(2).Enabled=   0   'False
         Tab(0).Control(3)=   "lblUsername"
         Tab(0).Control(3).Enabled=   0   'False
         Tab(0).Control(4)=   "lblPassword"
         Tab(0).Control(4).Enabled=   0   'False
         Tab(0).Control(5)=   "lblRFClients"
         Tab(0).Control(5).Enabled=   0   'False
         Tab(0).Control(6)=   "chkNTAuthentication"
         Tab(0).Control(6).Enabled=   0   'False
         Tab(0).Control(7)=   "txtLanguage"
         Tab(0).Control(7).Enabled=   0   'False
         Tab(0).Control(8)=   "txtSQLDatabase"
         Tab(0).Control(8).Enabled=   0   'False
         Tab(0).Control(9)=   "txtSQLServer"
         Tab(0).Control(9).Enabled=   0   'False
         Tab(0).Control(10)=   "txtSQLUser"
         Tab(0).Control(10).Enabled=   0   'False
         Tab(0).Control(11)=   "txtSQLPassword"
         Tab(0).Control(11).Enabled=   0   'False
         Tab(0).Control(12)=   "txtRFClients"
         Tab(0).Control(12).Enabled=   0   'False
         Tab(0).ControlCount=   13
         TabCaption(1)   =   "<TCP/IP Requirements>"
         TabPicture(1)   =   "Options.frx":2B2A
         Tab(1).ControlEnabled=   0   'False
         Tab(1).Control(0)=   "lblTCPIPMessage"
         Tab(1).Control(1)=   "txtTCPIPMessage"
         Tab(1).ControlCount=   2
         Begin VB.TextBox txtRFClients 
            Height          =   285
            Left            =   1680
            MaxLength       =   2
            TabIndex        =   11
            Top             =   2280
            Width           =   375
         End
         Begin VB.TextBox txtSQLPassword 
            Height          =   285
            IMEMode         =   3  'DISABLE
            Left            =   1680
            PasswordChar    =   "*"
            TabIndex        =   10
            Top             =   1590
            Width           =   3375
         End
         Begin VB.TextBox txtSQLUser 
            Height          =   285
            Left            =   1680
            TabIndex        =   9
            Top             =   1320
            Width           =   3375
         End
         Begin VB.TextBox txtSQLServer 
            Height          =   285
            Left            =   1680
            TabIndex        =   8
            Top             =   480
            Visible         =   0   'False
            Width           =   3375
         End
         Begin VB.TextBox txtSQLDatabase 
            Height          =   285
            Left            =   1680
            TabIndex        =   7
            Top             =   750
            Width           =   3375
         End
         Begin VB.TextBox txtLanguage 
            Height          =   285
            Left            =   1680
            MaxLength       =   1
            TabIndex        =   6
            Top             =   120
            Width           =   255
         End
         Begin VB.TextBox txtTCPIPMessage 
            Height          =   1815
            Left            =   -74880
            Locked          =   -1  'True
            MultiLine       =   -1  'True
            TabIndex        =   5
            Top             =   240
            Width           =   4935
         End
         Begin VB.CheckBox chkNTAuthentication 
            Caption         =   "<NTAuthentication>"
            Height          =   255
            Left            =   240
            TabIndex        =   4
            Top             =   1080
            Visible         =   0   'False
            Width           =   3015
         End
         Begin VB.Label lblRFClients 
            AutoSize        =   -1  'True
            Caption         =   "<RF Clients>"
            Height          =   195
            Left            =   240
            TabIndex        =   18
            Top             =   2280
            Width           =   900
         End
         Begin VB.Label lblPassword 
            AutoSize        =   -1  'True
            Caption         =   "<SQL password>"
            Height          =   195
            Left            =   240
            TabIndex        =   17
            Top             =   1560
            Width           =   1215
         End
         Begin VB.Label lblUsername 
            AutoSize        =   -1  'True
            Caption         =   "<SQL user>"
            Height          =   195
            Left            =   240
            TabIndex        =   16
            Top             =   1320
            Width           =   840
         End
         Begin VB.Label lblProvider 
            AutoSize        =   -1  'True
            Caption         =   "<SQL server>"
            Height          =   195
            Left            =   240
            TabIndex        =   15
            Top             =   480
            Visible         =   0   'False
            Width           =   975
         End
         Begin VB.Label lblDatabase 
            AutoSize        =   -1  'True
            Caption         =   "<SQL database>"
            Height          =   195
            Left            =   240
            TabIndex        =   14
            Top             =   720
            Width           =   1200
         End
         Begin VB.Label lblLanguage 
            AutoSize        =   -1  'True
            Caption         =   "<Language>"
            Height          =   195
            Left            =   240
            TabIndex        =   13
            Top             =   120
            Width           =   900
         End
         Begin VB.Label lblTCPIPMessage 
            Caption         =   $"Options.frx":2B46
            Height          =   375
            Left            =   -74880
            TabIndex        =   12
            Top             =   2160
            Visible         =   0   'False
            Width           =   5055
         End
      End
      Begin TabDlg.SSTab tabLanguage 
         Height          =   3015
         Left            =   -74880
         TabIndex        =   19
         TabStop         =   0   'False
         Top             =   360
         Width           =   5325
         _ExtentX        =   9393
         _ExtentY        =   5318
         _Version        =   393216
         TabOrientation  =   1
         Tabs            =   2
         TabHeight       =   520
         TabCaption(0)   =   "<Labels>"
         TabPicture(0)   =   "Options.frx":2C2B
         Tab(0).ControlEnabled=   -1  'True
         Tab(0).Control(0)=   "txtLabel4"
         Tab(0).Control(0).Enabled=   0   'False
         Tab(0).Control(1)=   "txtLabel3"
         Tab(0).Control(1).Enabled=   0   'False
         Tab(0).Control(2)=   "txtLabel2"
         Tab(0).Control(2).Enabled=   0   'False
         Tab(0).Control(3)=   "txtLabel1"
         Tab(0).Control(3).Enabled=   0   'False
         Tab(0).Control(4)=   "txtLabel0"
         Tab(0).Control(4).Enabled=   0   'False
         Tab(0).Control(5)=   "lstRFLabel"
         Tab(0).Control(5).Enabled=   0   'False
         Tab(0).ControlCount=   6
         TabCaption(1)   =   "<Messages>"
         TabPicture(1)   =   "Options.frx":2C47
         Tab(1).ControlEnabled=   0   'False
         Tab(1).Control(0)=   "txtMessage4"
         Tab(1).Control(1)=   "txtMessage3"
         Tab(1).Control(2)=   "txtMessage2"
         Tab(1).Control(3)=   "txtMessage1"
         Tab(1).Control(4)=   "txtMessage0"
         Tab(1).Control(4).Enabled=   0   'False
         Tab(1).Control(5)=   "lstRFMessage"
         Tab(1).Control(5).Enabled=   0   'False
         Tab(1).ControlCount=   6
         Begin VB.ListBox lstRFLabel 
            Height          =   2205
            ItemData        =   "Options.frx":2C63
            Left            =   120
            List            =   "Options.frx":2C6A
            TabIndex        =   31
            TabStop         =   0   'False
            Top             =   120
            Width           =   2415
         End
         Begin VB.ListBox lstRFMessage 
            Height          =   2205
            ItemData        =   "Options.frx":2C7A
            Left            =   -74880
            List            =   "Options.frx":2C81
            TabIndex        =   30
            TabStop         =   0   'False
            Top             =   120
            Width           =   2415
         End
         Begin VB.TextBox txtLabel0 
            Enabled         =   0   'False
            Height          =   285
            Left            =   2640
            Locked          =   -1  'True
            MaxLength       =   100
            TabIndex        =   29
            TabStop         =   0   'False
            Top             =   120
            Width           =   2535
         End
         Begin VB.TextBox txtLabel1 
            Height          =   285
            Left            =   2640
            MaxLength       =   100
            TabIndex        =   28
            Top             =   960
            Width           =   2535
         End
         Begin VB.TextBox txtLabel2 
            Height          =   285
            Left            =   2640
            MaxLength       =   100
            TabIndex        =   27
            Top             =   1320
            Width           =   2535
         End
         Begin VB.TextBox txtLabel3 
            Height          =   285
            Left            =   2640
            MaxLength       =   100
            TabIndex        =   26
            Top             =   1680
            Width           =   2535
         End
         Begin VB.TextBox txtLabel4 
            Height          =   285
            Left            =   2640
            MaxLength       =   100
            TabIndex        =   25
            Top             =   2040
            Width           =   2535
         End
         Begin VB.TextBox txtMessage0 
            Enabled         =   0   'False
            Height          =   285
            Left            =   -72360
            MaxLength       =   100
            TabIndex        =   24
            TabStop         =   0   'False
            Top             =   120
            Width           =   2535
         End
         Begin VB.TextBox txtMessage1 
            Height          =   285
            Left            =   -72360
            MaxLength       =   100
            TabIndex        =   23
            Top             =   960
            Width           =   2535
         End
         Begin VB.TextBox txtMessage2 
            Height          =   285
            Left            =   -72360
            MaxLength       =   100
            TabIndex        =   22
            Top             =   1320
            Width           =   2535
         End
         Begin VB.TextBox txtMessage3 
            Height          =   285
            Left            =   -72360
            MaxLength       =   100
            TabIndex        =   21
            Top             =   1680
            Width           =   2535
         End
         Begin VB.TextBox txtMessage4 
            Height          =   285
            Left            =   -72360
            MaxLength       =   100
            TabIndex        =   20
            Top             =   2040
            Width           =   2535
         End
      End
   End
End
Attribute VB_Name = "frmOptions"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim rsLabel As ADODB.Recordset
Dim rsMessage As ADODB.Recordset
Dim gbolOverOrder As Boolean
Dim gintOS        As Integer

Public Function GetLeftPosition(c As Control) As Double
    GetLeftPosition = c.Left + c.Width + 100
End Function

Private Sub chkNTAuthentication_Click()
If chkNTAuthentication Then
  txtSQLUser.Enabled = False
  txtSQLPassword.Enabled = False
Else
  txtSQLUser.Enabled = True
  txtSQLPassword.Enabled = True
End If
End Sub

Private Sub cmdCancel_Click()
Unload Me
End Sub

Private Sub cmdClose_Click()
Dim intOption As Integer
Dim rsTemp As ADODB.Recordset

'If txtSQLServer = "" Or txtSQLDatabase = "" Then
'    MsgBox GetMessage("msgSQLServerAndSQLDatabaseIsRequired"), vbExclamation + vbOKOnly, MDIForm1.Caption
'Else
        Set rsTemp = New ADODB.Recordset
        rsTemp.Open "SELECT * FROM RFSystemParameter", conLocal, adOpenDynamic, adLockOptimistic, adCmdText
        If Not rsTemp!Language = txtLanguage.Text Or IsNull(rsTemp!Language) Then
            rsTemp!Language = txtLanguage.Text
            rsTemp.Update
        End If
        
        'we are currently only using Jet 4.0
        
'        If Not rsTemp!Provider = txtSQLServer.Text Or IsNull(rsTemp!Provider) Then
'            rsTemp!Provider = txtSQLServer.Text
'            rsTemp.Update
'        End If
        If Not rsTemp!SQLDatabase = txtSQLDatabase.Text Or IsNull(rsTemp!SQLDatabase) Then
            rsTemp!SQLDatabase = txtSQLDatabase.Text
            rsTemp.Update
        End If
        If Not rsTemp("SQLNTAuthentication") = chkNTAuthentication Then
            rsTemp("SQLNTAuthentication") = chkNTAuthentication
            rsTemp.Update
        End If
        If Not rsTemp!SQLUser = txtSQLUser.Text Or IsNull(rsTemp!SQLUser) Then
            rsTemp!SQLUser = txtSQLUser.Text
            rsTemp.Update
        End If
        If Not rsTemp!SQLPassword = txtSQLPassword.Text Or IsNull(rsTemp!SQLPassword) Then
            rsTemp!SQLPassword = txtSQLPassword.Text
            rsTemp.Update
        End If
        
        If Not rsTemp!RFClients = Val(txtRFClients.Text) Or IsNull(rsTemp!RFClients) Then
            rsTemp!RFClients = Val(txtRFClients.Text)
            rsTemp.Update
        End If
        

        rsTemp.Update
        
        If Not Trim(txtLabel1 & txtLabel2 & txtLabel3 & txtLabel4) = "" Then
            If Not txtLabel1 = rsLabel!Label1 Or Not txtLabel2 = rsLabel!Label2 Or Not txtLabel3 = rsLabel!Label3 Or Not txtLabel4 = rsLabel!Label4 Then
                If Not rsLabel!Label1 = txtLabel1 Or IsNull(rsLabel!Label1) Then
                    rsLabel!Label1 = txtLabel1
                    rsLabel.Update
                End If
                If Not rsLabel!Label2 = txtLabel2 Or IsNull(rsLabel!Label2) Then
                    rsLabel!Label2 = txtLabel2
                    rsLabel.Update
                End If
                If Not rsLabel!Label3 = txtLabel3 Or IsNull(rsLabel!Label3) Then
                    rsLabel!Label3 = txtLabel3
                    rsLabel.Update
                End If
                If Not rsLabel!Label4 = txtLabel4 Or IsNull(rsLabel!Label4) Then
                    rsLabel!Label4 = txtLabel4
                    rsLabel.Update
                End If
            End If
        End If
        
        If Not Trim(txtMessage1 & txtMessage2 & txtMessage3 & txtMessage4) = "" Then
            If Not txtMessage1 = rsMessage!Message1 Or Not txtMessage2 = rsMessage!Message2 Or Not txtMessage3 = rsMessage!Message3 Or Not txtMessage4 = rsMessage!Message4 Then
                If Not rsMessage!Message1 = txtMessage1 Or IsNull(rsMessage!Message1) Then
                    rsMessage!Message1 = txtMessage1
                    rsMessage.Update
                End If
                If Not rsMessage!Message2 = txtMessage2 Or IsNull(rsMessage!Message2) Then
                    rsMessage!Message2 = txtMessage2
                    rsMessage.Update
                End If
                If Not rsMessage!Message3 = txtMessage3 Or IsNull(rsMessage!Message3) Then
                    rsMessage!Message3 = txtMessage3
                    rsMessage.Update
                End If
                If Not rsMessage!Message4 = txtMessage4 Or IsNull(rsMessage!Message4) Then
                    rsMessage!Message4 = txtMessage4
                    rsMessage.Update
                End If
            End If
        End If
        MsgBox GetMessage("msgRestartRF", rsTemp!Language), vbExclamation + vbOKOnly, MDIForm1.Caption
        rsRFSystemParameter.Requery
        'rsTemp.Close
        Set rsTemp = Nothing
        Unload Me
'End If
End Sub

Private Sub Form_Load()
On Error Resume Next

Rem Load the caption for form
Me.Caption = GetLabel("lblOptions")

Rem Do the language for the options tab
tabOptions.Tab = 0
Me.tabOptions.Caption = GetLabel("lblGeneral")
tabOptions.Tab = 1
Me.tabOptions.Caption = GetLabel("lblLanguage")

Rem Do the language for the language tab
tabLanguage.Tab = 0
Me.tabLanguage.Caption = GetLabel("lblLabels")
tabLanguage.Tab = 1
Me.tabLanguage.Caption = GetLabel("lblMessages")
tabLanguage.Tab = 0

Rem Do the language for the General tab
tabGeneral.Tab = 0
Me.tabGeneral.Caption = GetLabel("lblApplication")
tabGeneral.Tab = 1
Me.tabGeneral.Caption = GetLabel("lblTCPIP")
Me.lblTCPIPMessage.Caption = GetTCPIPMessage("lblTCPIPMessage", rsRFSystemParameter!Language)
Me.txtTCPIPMessage = Me.lblTCPIPMessage
tabGeneral.Tab = 0

Rem strDefault language
lblLanguage.Caption = GetLabel("lblLanguage")
txtLanguage.ToolTipText = GetToolTip("lblLanguage")
txtLanguage.Text = rsRFSystemParameter!Language

Rem SQL database name
lblDatabase.Caption = GetLabel("lblDatabase")
txtSQLDatabase.ToolTipText = GetToolTip("lblDatabase")
txtSQLDatabase.Text = IIf(IsNull(rsRFSystemParameter!SQLDatabase), "", rsRFSystemParameter!SQLDatabase)

Rem NT Authentication
chkNTAuthentication.Caption = GetLabel("chkNTAuthentication")
chkNTAuthentication.ToolTipText = GetToolTip("chkNTAuthentication")
chkNTAuthentication = IIf(rsRFSystemParameter("SQLNTAuthentication"), 1, 0)

Rem SQL user name
lblUsername.Caption = GetLabel("lblUsername")
txtSQLUser.ToolTipText = GetToolTip("lblUsername")
txtSQLUser.Text = IIf(IsNull(rsRFSystemParameter!SQLUser), "", rsRFSystemParameter!SQLUser)

Rem SQL user password
lblPassword.Caption = GetLabel("lblPassword")
txtSQLPassword.ToolTipText = GetToolTip("lblPassword")
txtSQLPassword.Text = IIf(IsNull(rsRFSystemParameter!SQLPassword), "", rsRFSystemParameter!SQLPassword)


Rem Total RF Clients
lblRFClients.Caption = GetLabel("lblRFClients")
txtRFClients.ToolTipText = GetToolTip("lblRFClients")
txtRFClients.Text = rsRFSystemParameter!RFClients


Rem Populate the labels list box
Set rsLabel = New ADODB.Recordset
rsLabel.Open "SELECT * FROM RFLabel ORDER BY LabelName", conLocal, adOpenKeyset, adLockOptimistic, adCmdText
If Not rsLabel.EOF Then
    lstRFLabel.Clear
    While Not rsLabel.EOF
        lstRFLabel.AddItem rsLabel!LabelName
        rsLabel.MoveNext
    Wend
lstRFLabel.ListIndex = 0
End If

Rem Populate the messages list box
Set rsMessage = New ADODB.Recordset
rsMessage.Open "SELECT * FROM RFMessage ORDER BY MessageName", conLocal, adOpenKeyset, adLockOptimistic, adCmdText
If Not rsMessage.EOF Then
    lstRFMessage.Clear
    While Not rsMessage.EOF
        lstRFMessage.AddItem rsMessage!MessageName
        rsMessage.MoveNext
    Wend
lstRFMessage.ListIndex = 0
End If

' Check the operating system and hide the tcp\ip tab if not Windows 98
  gintOS = GetWindowsVersion()
  Select Case gintOS
    Case 2  ' Windows 98
      Me.tabGeneral.TabVisible(1) = True
    Case Else
      Me.tabGeneral.TabVisible(1) = False
  End Select
Me.tabOptions.Tab = 0

End Sub



Private Sub lstRFLabel_Click()

If Not Trim(txtLabel1 & txtLabel2 & txtLabel3 & txtLabel4) = "" Then
    If Not txtLabel1 = rsLabel!Label1 Or Not txtLabel2 = rsLabel!Label2 Or Not txtLabel3 = rsLabel!Label3 Or Not txtLabel4 = rsLabel!Label4 Then
        If Not rsLabel!Label1 = txtLabel1 Or IsNull(rsLabel!Label1) Then
            rsLabel!Label1 = txtLabel1
            rsLabel.Update
        End If
        If Not rsLabel!Label2 = txtLabel2 Or IsNull(rsLabel!Label2) Then
            rsLabel!Label2 = txtLabel2
            rsLabel.Update
        End If
        If Not rsLabel!Label3 = txtLabel3 Or IsNull(rsLabel!Label3) Then
            rsLabel!Label3 = txtLabel3
            rsLabel.Update
        End If
        If Not rsLabel!Label4 = txtLabel4 Or IsNull(rsLabel!Label4) Then
            rsLabel!Label4 = txtLabel4
            rsLabel.Update
        End If
    End If
End If
rsLabel.MoveFirst
rsLabel.Find "LabelName='" & lstRFLabel.List(lstRFLabel.ListIndex) & "'"
If Not rsLabel.EOF Then
    txtLabel0 = IIf(IsNull(rsLabel!Label0), "", rsLabel!Label0)
    txtLabel1 = IIf(IsNull(rsLabel!Label1), "", rsLabel!Label1)
    txtLabel2 = IIf(IsNull(rsLabel!Label2), "", rsLabel!Label2)
    txtLabel3 = IIf(IsNull(rsLabel!Label3), "", rsLabel!Label3)
    txtLabel4 = IIf(IsNull(rsLabel!Label4), "", rsLabel!Label4)
Else
    txtLabel0 = ""
    txtLabel1 = ""
    txtLabel2 = ""
    txtLabel3 = ""
    txtLabel4 = ""
End If
End Sub
Private Sub lstRFMessage_Click()
If Not Trim(txtMessage1 & txtMessage2 & txtMessage3 & txtMessage4) = "" Then
    If Not txtMessage1 = rsMessage!Message1 Or Not txtMessage2 = rsMessage!Message2 Or Not txtMessage3 = rsMessage!Message3 Or Not txtMessage4 = rsMessage!Message4 Then
        If Not rsMessage!Message1 = txtMessage1 Or IsNull(rsMessage!Message1) Then
            rsMessage!Message1 = txtMessage1
            rsMessage.Update
        End If
        If Not rsMessage!Message2 = txtMessage2 Or IsNull(rsMessage!Message2) Then
            rsMessage!Message2 = txtMessage2
            rsMessage.Update
        End If
        If Not rsMessage!Message3 = txtMessage3 Or IsNull(rsMessage!Message3) Then
            rsMessage!Message3 = txtMessage3
            rsMessage.Update
        End If
        If Not rsMessage!Message4 = txtMessage4 Or IsNull(rsMessage!Message4) Then
            rsMessage!Message4 = txtMessage4
            rsMessage.Update
        End If
    End If
End If
rsMessage.MoveFirst
rsMessage.Find "MessageName='" & lstRFMessage.List(lstRFMessage.ListIndex) & "'"
If Not rsMessage.EOF Then
    txtMessage0 = IIf(IsNull(rsMessage!Message0), "", rsMessage!Message0)
    txtMessage1 = IIf(IsNull(rsMessage!Message1), "", rsMessage!Message1)
    txtMessage2 = IIf(IsNull(rsMessage!Message2), "", rsMessage!Message2)
    txtMessage3 = IIf(IsNull(rsMessage!Message3), "", rsMessage!Message3)
    txtMessage4 = IIf(IsNull(rsMessage!Message4), "", rsMessage!Message4)
Else
    txtMessage0 = ""
    txtMessage1 = ""
    txtMessage2 = ""
    txtMessage3 = ""
    txtMessage4 = ""
End If
End Sub

Private Sub tabOptions_Click(PreviousTab As Integer)
If tabOptions.Tab = 3 Then
    tabLanguage.Tab = 0
End If
End Sub

Private Sub txtLabel1_Change()
If txtLabel1.Text = "" Then
    MsgBox GetMessage("msgLabel1CannotBeBlank"), vbOKOnly, MDIForm1.Caption
    txtLabel1.SetFocus
End If
End Sub

Private Sub txtMessage1_LostFocus()
If txtMessage1.Text = "" Then
    MsgBox GetMessage("msgMessage1CannotBeBlank"), vbOKOnly, MDIForm1.Caption
    txtMessage1.SetFocus
End If
End Sub

